<template>
	<view class="register-view">
		<view class="logo">
			<image src="@/static/icon/image_60.png" mode="" class="register-image"></image>
		</view>

		<view class="input-all">
			<view class="hint">
				请输入绑定的手机号
			</view>
			<input type="text" placeholder="请输入绑定手机号" class="mobile-email" v-model="mobile">
		</view>

		<view class="register-but" @click="nextStep">
			下一步
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mobile: ""
			}
		},
		methods: {
			nextStep() {
				const reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
				const isGo = reg.test(this.mobile)
				if(isGo) {
					uni.navigateTo({
						url:"/pages/forgetPassword/getCode?mobile=" + this.mobile
					})
				} else {
					uni.showToast({
						icon: 'none',
						title: '手机号错误',
						duration: 1580
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.register-view {
		height: 100%;
		padding: 0 48rpx;
		position: relative;
	}

	.logo {
		text-align: center;

		.register-image {
			margin-top: 149rpx;
			width: 170rpx;
			height: 170rpx;
		}
	}

	.input-all {
		margin-top: 99.6rpx;
		position: relative;
		
		.hint {
			color: #000000;
			font-family: PingFang SC;
			font-weight: 700;
			font-size: 32rpx;
			line-height: 40rpx;
			letter-spacing: 0rpx;
			text-align: left;
			position: absolute;
			top: -60rpx;
		}

		.mobile-email {
			width: 100%;
			height: 56rpx;
			border-bottom: 2rpx solid #858585;
			padding: 8rpx 0;
		}

		.mobile-email::placeholder {
			color: #858585;
			font-family: PingFang SC;
			font-weight: regular;
			font-size: 30rpx;
			line-height: 40rpx;
			letter-spacing: 0rpx;
			text-align: left;
		}
	}

	.ver-img {
		width: 26rpx;
		height: 26rpx;
		margin-right: 18rpx;
	}

	.register-but {
		height: 80rpx;
		width: 100%;
		border-radius: 20rpx;
		background: #000000;
		color: #FFFFFF;
		font-family: PingFang SC;
		font-weight: semibold;
		font-size: 28rpx;
		line-height: 80rpx;
		text-align: center;
		margin-top: 80rpx;
	}
</style>
